package com.example.service.implService;

import com.example.dao.RoleDao;
import com.example.pojo.Role;
import com.example.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {
    private final RoleDao roleDao;

    @Autowired
    public RoleServiceImpl(RoleDao roleDao) {
        this.roleDao = roleDao;
    }

    @Override
    public List<Role> roleList() {
        return roleDao.roleList();
    }

    @Override
    public List<Role> getRoleByname(String rname) {
        return roleDao.getRoleByname(rname);
    }
}
